[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
XPaSave()
Save an Array to disk
------------------------------------------------------------------------------
Function: XPaSave()
This is a powerful function, that, in combination with
XPaRestore() renders obsolete the use of the Clipper .MEM
save and restore system. XPaSave() accepts any Array (or
any datatype except code-blocks and objects) and saves it
to a file on disk. Even if the Array is multi-dimensionned,
thanks to recursive calls, there's no problem. That exact
same array can then be restored using the XPaRestore() function,
no need whatsoever to use those doomed Publics or Privates
anymore.
Binker users: Note that you should set the PROCEDURE DEPTH
accordingly when you are planning to save arrays with lot's
of dimensions. If you get FATAL ERROR 650 (or som'thing of
that nature, you know what the trouble is)..
this function could have been extended with a special header
to identify the save file, or the use of encryption. I decided
not to add those for simplicity, but it is of course possible
to do it oneself with the sources.
Syntax: XPaSave(cFileName,aVar) --> lSucces
Arguments: <cFileName> is the file to save to. Extension needs to be
supplied by yourself. <aVar> is any data-item really, but
usually will be an array with the data you want to save. The
array can be multidimensionned, XPaSave() will work in any case.
Returns: .t. on succesful save, .f. otherwise.
Usage: XPaSave('TEST',{'Array',12,{'Multi','Dimensional'},date()})
Even this is possible (it saves current DIR information):
XPaSave('DIRECTRY.DAT',Directory('*.*'))
See Also:
XPaRestore()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson